import cook.Ingredient
import login.User
import modal.MeasuringUnit
import org.apache.shiro.crypto.hash.Sha256Hash

class BootStrap {

    def init = { servletContext ->
		
		def user = new User(username:"simona",passwordHash: new Sha256Hash("simona").toHex())
		user.addToPermissions("dish:*")
		user.addToPermissions("dishComponent:*")
		user.addToPermissions("ingredient:*")
		user.addToPermissions("ingredientItem:*")
		user.addToPermissions("measuringUnit:*")
		user.addToPermissions("wish:*")
		user.addToPermissions("wishItem:*")
		user.save()
		
		
    }
    def destroy = {
    }
}
